<script>
	export default {
		globalData: {
			statusBarHeight: 0, // 状态导航栏高度
			navigationBarHeight: 0, // 导航栏高度(标题栏高度)
		},
		onLaunch: function() {
			
			// 状态栏高度
			this.globalData.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
			// 获取微信胶囊的位置信息 
			const custom = wx.getMenuButtonBoundingClientRect();
			// 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
			this.globalData.navigationBarHeight = custom.height + (custom.top - this.globalData.statusBarHeight) * 2;
			// 缓存本地数据
			uni.setStorageSync('statusBarHeight', this.globalData.statusBarHeight);
			uni.setStorageSync('navigationBarHeight', this.globalData.navigationBarHeight);
			uni.setStorageSync('headerContHeight', this.globalData.navigationBarHeight + this.globalData.statusBarHeight);
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	  .uni-app--showleftwindow + .uni-tabbar-bottom {
	  	display: none;
	  }
	  
	  
</style>
